export function formatTree(first,url){
  let data = window.localStorage.getItem('tree');
  let tree = JSON.parse(data);
  let key = '';
  tree.forEach((item,index)=>{
    if (item.name===first){
      item.childPermissions.forEach((menu,i)=>{
        if (menu.url === url){
          key = menu.id
        }
      })
    }
  })
  return key
}
